/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Utility;

import constants.CommonConstants;
import java.io.IOException;
import org.apache.log4j.FileAppender;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;

/**
 *
 * @author Shuhail
 */
public class RoyalLogger {

    public RoyalLogger() {
        
    }
    
   public  static Logger log() throws IOException {
        PropReader prop=PropReader.getInstance();
        String fileName=prop.getVal(CommonConstants.Log_File, "log.properties.properties");
        Logger log=Logger.getLogger("[Royal-Batteries]");
         FileAppender fa=new FileAppender(new PatternLayout(),fileName);
         log.addAppender(fa);
         return log;
    }
    
    
}
